package com.example.demo.service.exam;

import com.example.demo.domain.PageResult;
import com.example.demo.domain.exam.ExamUserScore;
import com.example.demo.domain.exam.QueryModel;
import com.example.demo.domain.exam.condition.ExamUserScoreCondition;

import java.util.List;

public interface ExamUserScoreService {

    /**
     * 考试用户成绩分页接口
     * @param model 查询条件
     * @return 分页结果
     */
    PageResult<ExamUserScore> page(QueryModel<ExamUserScoreCondition> model);

    /**
     * 按考试id查询成绩
     * @param examId 考试id
     * @return 成绩
     */
    List<ExamUserScore> getByExamId(Long examId);

    ExamUserScore getByExamUserId(Long examId, Long userId);

    void insertOrUpdate(ExamUserScore entity);

    void insertList(List<ExamUserScore> list);

    void deleteByExamUserId(Long examId, Long userId);

    void insertOrUpdateList(List<ExamUserScore> list);

    List<ExamUserScore> getByExamUserId(List<Long> examIds, Long userId);
}
